<!DOCTYPE html>
<div ng-controller="userEditCtrl" class="panel-body">

<div class="row">
    <div class="col-lg-12">
        <h1><i class="fa fa-edit"></i> Add/Edit User</h1>
        <ol class="breadcrumb">
            <li><a href="#/admin/dashboard"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="#/admin/user/list"><i class="fa fa-users"></i> User Management</a></li>
            <li class="active"><i class="fa fa-edit"></i> Add/Edit User</li>
        </ol>
    </div>
</div>

<div class="row">
    <div class="col-lg-8">
        <form id="userForm" ng-submit="save()">
            <fieldset>
	            <div class="panel panel-default" ><div class="panel-body">
	                <div class="form-group">
	                    <label>Username</label>
	                    <input id="username" class="form-control"  regtext="Please provide your username" 
	                    placeholder="Enter username" ng-model="fieldData.username"  required >
	                </div>
	<!--                 ---- Add Mode --- -->
					<x id="addmode">
		                <div class="form-group">
		                    <label >Password</label>
		                    <input class="form-control" type="password" placeholder="Enter password" id="password" >
		                </div>
		                <div class="form-group">
		                    <label>Confirm Password</label>
		                    <input password-required id="confirmpassword" class="form-control" type="password" placeholder="Enter confirm password" >
		                </div>
	                </x> 
	
	                <div class="form-group">
	                    <label>Display name</label>
	                    <input class="form-control" placeholder="Enter display name" ng-model="fieldData.displayname" required>
	                </div>
	                <div class="form-group">
	                    <label>Email</label>
	                    <input class="form-control" type="email"  placeholder="Enter email" ng-model="fieldData.email" required>
	                </div>
	                <div class="form-group">
	                    <label>First name</label>
	                    <input class="form-control" placeholder="Enter first name" ng-model="fieldData.firstname" required>
	                </div>
	                <div class="form-group">
	                    <label>Last name</label>
	                    <input class="form-control" placeholder="Enter last name" ng-model="fieldData.lastname" required>
	                </div>
	                <div class="form-group">
	                    <label>Age</label>
	                    <input class="form-control" type="number" placeholder="Enter age" ng-model="fieldData.age" required>
	                </div>
	                <div class="form-group">
	                    <label>Birthday</label>
	                    <input id="birthday" ng-model="fieldData.birthday" class="form-control datepicker"  required/>
	                </div>
	                <div class="form-group">
	                    <label>User type</label>
	                    <select class="form-control" id="usertype" ng-model="fieldData.usertype">
	    						<option ng-repeat="v in enum.userTypes" value="{{v.key}}">{{v.value}}</option>
	  					</select>
	                </div>
	                <div class="form-group">
	                    <label>Status</label><br>
	                    <label class="radio-inline" >
	                        <input type="radio"  id="optUserActive" ng-value="1" ng-model="fieldData.status" checked> Active
	                    </label>
	                    <label class="radio-inline" >
	                        <input type="radio"  id="optUserInactive" ng-value="0" ng-model="fieldData.status">
	                        Inactive
	                    </label>
	                </div>
	                </div>
                </div>
                
                 <!--                 ---- Edit Mode --- -->       
                 <div class="panel panel-default"  id="editmode">
					  <div class="panel-body">
<!-- 					   <x id="editmode" >        -->
	                <div class="form-group">
	                    <label>Change Password</label>
	                    <input class="form-control" type="password" placeholder="Enter change password" id="newpassword" />
	                </div>
	                <div class="form-group">
	                    <label>Confirm Change Password</label>
	                    <input class="form-control" type="password" placeholder="Enter confirm change password" id="confirmnewpassword" />
	                </div>
<!--                 </x>  -->
					  </div>
					</div>
 				
                <div class="form-group">                   
                    <button type="button" class="btn btn-primary" onClick= "location = '#/admin/user/list'; "><i class="fa fa-hand-o-left"></i> Back</button>
                    <button type="submit" class="btn btn-primary" ><i class="fa fa-save"></i> Save</button>
                     
                </div>
                <br/>

            </fieldset>
        </form>
    </div>
</div>

</div>
